home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2000 January / Gamestar_14_2000-01_cd1.bin / PATCHE / age2cpfix.exe / CABFILE / MSGAME.CAB / data / GAMEDATA.DRS / Unnamed File 000028.bina < prev    next >
Text File  |  1999-11-11  |  18KB  |  803 lines

  1. (defrule
  2.     (goal siege-available YES)
  3.     (or
  4.         (building-type-count siege-workshop > 0)
  5.         (building-type-count castle > 0)
  6.     )
  7.     (or
  8.         (or
  9.             (players-building-type-count any-enemy watch-tower-line > 1)
  10.             (players-building-type-count any-enemy castle > 0)
  11.         )
  12.         (or
  13.             (players-building-type-count any-enemy bombard-tower > 0)
  14.             (players-building-type-count any-enemy town-center > 1)
  15.         )
  16.     )
  17. =>
  18.     (set-goal siege-available NO)
  19. )
  20.  
  21. (defrule
  22.     (goal siege-available YES)
  23.     (or
  24.         (players-building-type-count any-enemy stone-wall > 10)
  25.         (players-building-type-count any-enemy fortified-wall > 10)
  26.     )
  27. =>
  28.     (set-goal siege-available NO)
  29. )
  30.  
  31. (defrule
  32.     (goal siege-available NO)
  33.     (or
  34.         (population >= pop-cap)
  35.         (or
  36.             (or
  37.                 (unit-type-count mangonel-line > 0)
  38.                 (unit-type-count battering-ram-line > 0)
  39.             )
  40.             (or
  41.                 (unit-type-count bombard-cannon > 0)
  42.                 (unit-type-count trebuchet > 0)
  43.             )
  44.         )
  45.     )
  46. =>
  47.     (set-goal siege-available YES)
  48. )
  49.  
  50. (defrule
  51.     (goal siege-available NO)
  52.     (goal 1 10)
  53.     (unit-type-count cannon-galleon > 1)
  54. =>
  55.     (set-goal siege-available YES)
  56. )
  57.  
  58. (defrule
  59.     (goal soldiers-available NO)
  60.     (or
  61.         (or
  62.             (unit-type-count militiaman-line > five-percent-pop)
  63.             (unit-type-count knight-line > five-percent-pop)
  64.         )
  65.         (or
  66.             (or
  67.                 (unit-type-count scout-cavalry-line > five-percent-pop)
  68.                 (unit-type-count cavalry-archer-line > five-percent-pop)
  69.             )
  70.             (or
  71.                 (unit-type-count archer-line > five-percent-pop)
  72.                 (unit-type-count my-unique-unit-line > five-percent-pop)
  73.             )
  74.         )
  75.     )
  76. =>
  77.     (set-goal soldiers-available YES)
  78. )
  79.  
  80. (defrule
  81.     (goal soldiers-available YES)
  82.     (unit-type-count militiaman-line < five-percent-pop)
  83.     (unit-type-count knight-line < five-percent-pop)
  84.     (unit-type-count scout-cavalry-line < five-percent-pop)
  85.     (unit-type-count cavalry-archer-line < five-percent-pop)
  86.     (unit-type-count archer-line < five-percent-pop)
  87.     (unit-type-count my-unique-unit-line < five-percent-pop)
  88. =>
  89.     (set-goal soldiers-available NO)
  90. )
  91.  
  92. ;*****************************************
  93. ;MANGONEL/ONAGER
  94.  
  95. (defrule
  96.     (goal siege-available NO)
  97.     (can-train-with-escrow mangonel-line)
  98.     (nor
  99.         (can-train mangonel-line)
  100.         (goal upgrade-conflict NOTICE)
  101.     )
  102. =>
  103.     (release-escrow wood)
  104.     (release-escrow gold)
  105.     (train mangonel-line)
  106. )
  107.  
  108. (defrule
  109.     (goal soldiers-available YES)
  110.     (unit-type-count-total mangonel-line < five-percent-pop)
  111.     (can-train mangonel-line)
  112.     (not (unit-available bombard-cannon) )
  113. =>
  114.     (train mangonel-line)
  115. )
  116.  
  117. (defrule
  118.     (goal archer-upgrades YES)
  119.     (goal soldiers-available YES)
  120.     (difficulty <= moderate)
  121.     (unit-type-count-total mangonel-line < ten-percent-pop)
  122.     (can-train mangonel-line)
  123.     (research-completed ri-onager)
  124.     (or
  125.         (cc-players-building-type-count any-enemy watch-tower-line > 2)
  126.         (or
  127.             (cc-players-building-type-count any-enemy castle > 0)
  128.             (cc-players-building-type-count any-enemy town-center > 1)
  129.         )
  130.     )
  131.     (not (unit-available bombard-cannon) )
  132. =>
  133.     (train mangonel-line)
  134. )
  135.  
  136. (defrule
  137.     (goal soldiers-available YES)
  138.     (unit-type-count-total mangonel-line < ten-percent-pop)
  139.     (can-train siege-onager)
  140. =>
  141.     (train siege-onager)
  142. )
  143. ;****************************************
  144. ;RAMS
  145.  
  146. (defrule
  147.     (goal siege-available NO)
  148.     (can-train-with-escrow battering-ram-line)
  149.     (nor
  150.         (can-train battering-ram-line)
  151.         (or
  152.             (goal upgrade-conflict NOTICE)
  153.             (town-under-attack)
  154.         )
  155.     )
  156. =>
  157.     (release-escrow wood)
  158.     (release-escrow gold)
  159.     (train battering-ram-line)
  160. )
  161.  
  162. (defrule
  163.     (goal soldiers-available YES)
  164.     (unit-type-count-total battering-ram-line < five-percent-pop)
  165.     (can-train battering-ram-line)
  166.     (nor
  167.         (unit-available bombard-cannon)
  168.         (town-under-attack)
  169.     )
  170. =>
  171.     (train battering-ram-line)
  172. )
  173.  
  174. (defrule
  175.     (goal soldiers-available YES)
  176.     (unit-type-count-total battering-ram-line < ten-percent-pop)
  177.     (cc-players-building-type-count any-enemy bombard-tower == 0)
  178.     (research-completed ri-capped-ram)
  179.     (can-train battering-ram)
  180.     (or
  181.         (cc-players-building-type-count any-enemy castle > 0)
  182.         (or
  183.             (cc-players-building-type-count any-enemy town-center > 1)
  184.             (cc-players-building-type-count any-enemy watch-tower-line > 2)
  185.         )
  186.     )
  187.     (nor
  188.         (unit-available bombard-cannon)
  189.         (town-under-attack)
  190.     )
  191. =>
  192.     (train battering-ram)
  193. )
  194.  
  195. (defrule
  196.     (goal soldiers-available YES)
  197.     (unit-type-count-total battering-ram-line < ten-percent-pop)
  198.     (can-train siege-ram)
  199.     (not (town-under-attack) )
  200. =>
  201.     (train siege-ram)
  202. )
  203.  
  204.  
  205. ;****************************************
  206. ;BOMBARD CANNONS
  207. (defrule
  208.     (goal siege-available NO)
  209.     (difficulty <= moderate)
  210.     (can-train-with-escrow bombard-cannon)
  211.     (nor
  212.         (can-train bombard-cannon)
  213.         (or
  214.             (goal upgrade-conflict NOTICE)
  215.             (town-under-attack)
  216.         )
  217.     )
  218. =>
  219.     (release-escrow wood)
  220.     (release-escrow gold)
  221.     (train bombard-cannon)
  222.     (chat-local-to-self "bombard")
  223. )
  224.  
  225. (defrule
  226.     (goal soldiers-available YES)
  227.     (difficulty <= moderate)
  228.     (unit-type-count-total bombard-cannon < five-percent-pop)
  229.     (can-train bombard-cannon)
  230.     (not (town-under-attack) )
  231. =>
  232.     (train bombard-cannon)
  233.     (chat-local-to-self "bombard")
  234. )
  235.  
  236. (defrule
  237.     (goal soldiers-available YES)
  238.     (difficulty <= hard)
  239.     (unit-type-count-total bombard-cannon < ten-percent-pop)
  240.     (can-train bombard-cannon)
  241.     (or
  242.         (soldier-count > twenty-percent-pop)
  243.         (map-type black-forest)
  244.     )
  245.     (not (town-under-attack) )
  246. =>
  247.     (train bombard-cannon)
  248.     (chat-local-to-self "bombard")
  249. )
  250.  
  251. ;***********************
  252. ;TREBUCHETS
  253. (defrule
  254.     (goal siege-available NO)
  255.     (can-train-with-escrow trebuchet)
  256.     (nor
  257.         (can-train trebuchet)
  258.         (or
  259.             (goal upgrade-conflict NOTICE)
  260.             (town-under-attack)
  261.         )
  262.     )
  263. =>
  264.     (release-escrow wood)
  265.     (release-escrow gold)
  266.     (train trebuchet)
  267. )
  268.  
  269. (defrule
  270.     (goal soldiers-available YES)
  271.     (unit-type-count-total trebuchet < 3)
  272.     (soldier-count > fifteen-percent-pop)
  273.     (can-train trebuchet)
  274.     (not (town-under-attack) )
  275. =>
  276.     (train trebuchet)
  277. )
  278.  
  279. (defrule
  280.     (goal soldiers-available YES)
  281.     (unit-type-count-total trebuchet < 3)
  282.     (can-train-with-escrow trebuchet)
  283.     (nor 
  284.         (can-train trebuchet)
  285.         (or
  286.             (goal upgrade-conflict NOTICE)
  287.             (town-under-attack)
  288.         )
  289.     )
  290.     (or
  291.         (cc-players-building-type-count any-enemy town-center > 1)
  292.         (map-type black-forest)
  293.     )
  294. =>
  295.     (release-escrow wood)
  296.     (release-escrow gold)
  297.     (train trebuchet)
  298. )
  299.  
  300. (defrule
  301.     (goal soldiers-available YES)
  302.     (unit-type-count-total trebuchet < 3)
  303.     (can-train-with-escrow trebuchet)
  304.     (nor 
  305.         (can-train trebuchet)
  306.         (or
  307.             (goal upgrade-conflict NOTICE)
  308.             (town-under-attack)
  309.         )
  310.     )
  311.     (or
  312.         (cc-players-building-type-count any-enemy castle > 0)
  313.         (cc-players-building-type-count any-enemy watch-tower-line > 3)
  314.     )
  315. =>
  316.     (release-escrow wood)
  317.     (release-escrow gold)
  318.     (train trebuchet)
  319. )
  320.  
  321. ;*********************************
  322. #load-if-not-defined DEATH-MATCH
  323.  
  324. ;build superunits
  325. (defrule
  326.     (current-age == imperial-age)
  327. =>
  328.     (disable-timer t-ageup)
  329.     (enable-timer t-ageup 30)
  330.     (disable-self)
  331. )
  332.  
  333. (defrule
  334.     (population < unit-max)
  335.     (timer-triggered  t-ageup)
  336.     (can-train my-unique-unit-line)
  337. =>
  338.     (train my-unique-unit-line)
  339.     (set-goal secondary-build 0)
  340. )
  341.  
  342. (defrule
  343.     (population < unit-max)
  344.     (timer-triggered  t-ageup)
  345.     (can-train champion)
  346. =>
  347.     (train champion)
  348.     (set-goal secondary-build 0)
  349. )
  350.  
  351. (defrule
  352.     (population < unit-max)
  353.     (timer-triggered  t-ageup)
  354.     (can-train paladin)
  355. =>
  356.     (train paladin)
  357.     (set-goal secondary-build 0)
  358. )
  359.  
  360. (defrule
  361.     (population < unit-max)
  362.     (timer-triggered  t-ageup)
  363.     (can-train heavy-cavalry-archer)
  364. =>
  365.     (train heavy-cavalry-archer)
  366.     (set-goal secondary-build 0)
  367. )
  368.  
  369. (defrule
  370.     (population < unit-max)
  371.     (timer-triggered  t-ageup)
  372.     (can-train hand-cannoneer)
  373. =>
  374.     (train hand-cannoneer)
  375.     (set-goal secondary-build 0)
  376. )
  377.  
  378. (defrule
  379.     (population < unit-max)
  380.     (timer-triggered  t-ageup)
  381.     (can-train arbalest)
  382.     (or
  383.         (goal secondary-build 0)
  384.         (not (unit-available hand-cannoneer) )
  385.     )
  386. =>
  387.     (train arbalest)
  388.     (set-goal secondary-build 1)
  389. )
  390.  
  391. (defrule
  392.     (current-age == imperial-age)
  393.     (timer-triggered  t-ageup)
  394. =>
  395.     (disable-timer t-ageup)
  396.     (enable-timer t-ageup 30)
  397. )
  398. #end-if
  399. ;******************************************************
  400. ;train specialty units
  401. (defrule
  402.     (unit-type-count-total camel-line < 1)
  403.     (can-train camel-line)
  404.     (or
  405.         (or
  406.             (cc-players-unit-type-count any-enemy knight-line >= five-percent-pop)
  407.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
  408.         )
  409.         (or
  410.             (cc-players-unit-type-count any-enemy light-cavalry >= five-percent-pop)
  411.             (cc-players-unit-type-count any-enemy camel-line >= five-percent-pop)
  412.         )
  413.     )
  414.     (or
  415.         (goal siege-available YES)
  416.         (town-under-attack)
  417.     )
  418. =>
  419.     (train camel-line)
  420. )
  421.  
  422. (defrule
  423.     (unit-type-count-total camel-line < 1)
  424.     (can-train camel-line)
  425.     (or
  426.         (or
  427.             (cc-players-unit-type-count any-enemy cataphract-line >= five-percent-pop)
  428.             (cc-players-unit-type-count any-enemy war-elephant-line >= five-percent-pop)
  429.         )
  430.         (or
  431.             (cc-players-unit-type-count any-enemy mameluke-line >= five-percent-pop)
  432.             (cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
  433.         )
  434.     )
  435.     (or
  436.         (goal siege-available YES)
  437.         (town-under-attack)
  438.     )
  439. =>
  440.     (train camel-line)
  441. )
  442.  
  443. (defrule
  444.     (unit-type-count-total camel-line < five-percent-pop)
  445.     (can-train camel-line)
  446.     (or
  447.         (or
  448.             (cc-players-unit-type-count any-enemy knight-line >= ten-percent-pop)
  449.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
  450.         )
  451.         (or
  452.             (cc-players-unit-type-count any-enemy light-cavalry >= ten-percent-pop)
  453.             (cc-players-unit-type-count any-enemy camel-line >= ten-percent-pop)
  454.         )
  455.     )
  456.     (or
  457.         (goal siege-available YES)
  458.         (town-under-attack)
  459.     )
  460. =>
  461.     (train camel-line)
  462. )
  463.  
  464. (defrule
  465.     (unit-type-count-total camel-line < five-percent-pop)
  466.     (can-train camel-line)
  467.     (or
  468.         (or
  469.             (cc-players-unit-type-count any-enemy cataphract-line >= ten-percent-pop)
  470.             (cc-players-unit-type-count any-enemy war-elephant-line >= ten-percent-pop)
  471.         )
  472.         (or
  473.             (cc-players-unit-type-count any-enemy mameluke-line >= ten-percent-pop)
  474.             (cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
  475.         )
  476.     )
  477.     (or
  478.         (goal siege-available YES)
  479.         (town-under-attack)
  480.     )
  481. =>
  482.     (train camel-line)
  483. )
  484.  
  485. (defrule
  486.     (unit-type-count-total spearman-line < 1)
  487.     (can-train spearman-line)
  488.     (or
  489.         (or
  490.             (cc-players-unit-type-count any-enemy knight-line >= five-percent-pop)
  491.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
  492.         )
  493.         (or
  494.             (cc-players-unit-type-count any-enemy light-cavalry >= five-percent-pop)
  495.             (cc-players-unit-type-count any-enemy camel-line >= five-percent-pop)
  496.         )
  497.     )
  498.     (or
  499.         (goal siege-available YES)
  500.         (town-under-attack)
  501.     )
  502. =>
  503.     (train spearman-line)
  504. )
  505.  
  506. (defrule
  507.     (unit-type-count-total spearman-line < 1)
  508.     (can-train spearman-line)
  509.     (or
  510.         (or
  511.             (cc-players-unit-type-count any-enemy cataphract-line >= five-percent-pop)
  512.             (cc-players-unit-type-count any-enemy war-elephant-line >= five-percent-pop)
  513.         )
  514.         (or
  515.             (cc-players-unit-type-count any-enemy mameluke-line >= five-percent-pop)
  516.             (cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
  517.         )
  518.     )
  519.     (or
  520.         (goal siege-available YES)
  521.         (town-under-attack)
  522.     )
  523. =>
  524.     (train spearman-line)
  525. )
  526.  
  527. (defrule
  528.     (unit-type-count-total spearman-line < five-percent-pop)
  529.     (can-train spearman)
  530.     (or
  531.         (or
  532.             (cc-players-unit-type-count any-enemy knight-line >= ten-percent-pop)
  533.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
  534.         )
  535.         (or
  536.             (cc-players-unit-type-count any-enemy light-cavalry >= ten-percent-pop)
  537.             (cc-players-unit-type-count any-enemy camel-line >= ten-percent-pop)
  538.         )
  539.     )
  540.     (or
  541.         (goal siege-available YES)
  542.         (town-under-attack)
  543.     )
  544. =>
  545.     (train spearman)
  546. )
  547.  
  548. (defrule
  549.     (unit-type-count-total spearman-line < five-percent-pop)
  550.     (can-train spearman-line)
  551.     (or
  552.         (or
  553.             (cc-players-unit-type-count any-enemy cataphract-line >= ten-percent-pop)
  554.             (cc-players-unit-type-count any-enemy war-elephant-line >= ten-percent-pop)
  555.         )
  556.         (or
  557.             (cc-players-unit-type-count any-enemy mameluke-line >= ten-percent-pop)
  558.             (cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
  559.         )
  560.     )
  561.     (or
  562.         (goal siege-available YES)
  563.         (town-under-attack)
  564.     )
  565. =>
  566.     (train spearman-line)
  567. )
  568.  
  569. (defrule
  570.     (unit-type-count-total skirmisher-line < 1)
  571.     (can-train skirmisher-line)
  572.     (or
  573.         (or
  574.             (cc-players-unit-type-count any-enemy archer-line >= five-percent-pop)
  575.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
  576.         )
  577.         (or
  578.             (cc-players-unit-type-count any-enemy skirmisher-line >= five-percent-pop)
  579.             (cc-players-unit-type-count any-enemy hand-cannoneer >= five-percent-pop)
  580.         )
  581.     )
  582.     (or
  583.         (goal siege-available YES)
  584.         (town-under-attack)
  585.     )
  586. =>
  587.     (train skirmisher-line)
  588. )
  589.  
  590. (defrule
  591.     (unit-type-count-total skirmisher-line < 1)
  592.     (can-train skirmisher-line)
  593.     (or
  594.         (or
  595.             (cc-players-unit-type-count any-enemy longbowman-line >= five-percent-pop)
  596.             (cc-players-unit-type-count any-enemy chu-ko-nu-line >= five-percent-pop)
  597.         )
  598.         (or
  599.             (cc-players-unit-type-count any-enemy mangudai-line >= five-percent-pop)
  600.             (cc-players-unit-type-count any-enemy janissary-line >= five-percent-pop)
  601.         )
  602.     )
  603.     (or
  604.         (goal siege-available YES)
  605.         (town-under-attack)
  606.     )
  607. =>
  608.     (train skirmisher-line)
  609. )
  610.  
  611. (defrule
  612.     (unit-type-count-total skirmisher-line < five-percent-pop)
  613.     (can-train skirmisher-line)
  614.     (or
  615.         (or
  616.             (cc-players-unit-type-count any-enemy archer-line >= ten-percent-pop)
  617.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
  618.         )
  619.         (or
  620.             (cc-players-unit-type-count any-enemy skirmisher-line >= ten-percent-pop)
  621.             (cc-players-unit-type-count any-enemy hand-cannoneer >= ten-percent-pop)
  622.         )
  623.     )
  624.     (or
  625.         (goal siege-available YES)
  626.         (town-under-attack)
  627.     )
  628. =>
  629.     (train skirmisher-line)
  630. )
  631.  
  632. (defrule
  633.     (unit-type-count-total skirmisher-line < five-percent-pop)
  634.     (can-train skirmisher-line)
  635.     (or
  636.         (or
  637.             (cc-players-unit-type-count any-enemy longbowman-line >= ten-percent-pop)
  638.             (cc-players-unit-type-count any-enemy chu-ko-nu-line >= ten-percent-pop)
  639.         )
  640.         (or
  641.             (cc-players-unit-type-count any-enemy mangudai-line >= ten-percent-pop)
  642.             (cc-players-unit-type-count any-enemy janissary-line >= ten-percent-pop)
  643.         )
  644.     )
  645.     (or
  646.         (goal siege-available YES)
  647.         (town-under-attack)
  648.     )
  649. =>
  650.     (train skirmisher-line)
  651. )
  652.  
  653. (defrule
  654.     (unit-type-count-total light-cavalry < 1)
  655.     (can-train light-cavalry)
  656.     (or
  657.         (or
  658.             (cc-players-unit-type-count any-enemy archer-line >= five-percent-pop)
  659.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= five-percent-pop)
  660.         )
  661.         (or
  662.             (cc-players-unit-type-count any-enemy skirmisher-line >= five-percent-pop)
  663.             (cc-players-unit-type-count any-enemy monk >= five-percent-pop)
  664.         )
  665.     )
  666.     (or
  667.         (goal siege-available YES)
  668.         (town-under-attack)
  669.     )
  670. =>
  671.     (train light-cavalry)
  672. )
  673.  
  674. (defrule
  675.     (unit-type-count-total light-cavalry <= five-percent-pop)
  676.     (can-train light-cavalry)
  677.     (or
  678.         (or
  679.             (cc-players-unit-type-count any-enemy archer-line >= ten-percent-pop)
  680.             (cc-players-unit-type-count any-enemy cavalry-archer-line >= ten-percent-pop)
  681.         )
  682.         (or
  683.             (cc-players-unit-type-count any-enemy skirmisher-line >= ten-percent-pop)
  684.             (cc-players-unit-type-count any-enemy monk >= ten-percent-pop)
  685.         )
  686.     )
  687.     (or
  688.         (goal siege-available YES)
  689.         (town-under-attack)
  690.     )
  691. =>
  692.     (train light-cavalry)
  693. )
  694.  
  695. ;**********************************
  696. ;monks
  697. ;decide who is to be the monk-builder par excellence. 
  698.  
  699. (defrule
  700.     (goal monk-rating GOOD)
  701.     (difficulty <= moderate)
  702.     (taunt-detected any-ally 230)
  703. =>
  704.     (set-goal monk-rating FAIR)
  705.     (acknowledge-taunt this-any-ally 230)
  706.     (disable-self)
  707. )
  708.  
  709. (defrule
  710.     (taunt-detected any-ally 230)
  711.     (difficulty <= moderate)
  712.     (or
  713.         (goal monk-rating FAIR)
  714.         (goal monk-rating POOR)
  715.     )
  716. =>
  717.     (set-goal monk-rating NO)
  718.     (acknowledge-taunt this-any-ally 230)
  719.     (disable-self)
  720. )
  721.  
  722. (defrule
  723.     (goal monk-rating GOOD)
  724.     (difficulty <= moderate)
  725.     (game-time >= 600)
  726.     (player-computer any-ally)
  727. =>
  728.     (chat-to-player-using-id every-ally 22409)    ;230
  729.     (disable-self)
  730. )
  731.  
  732. (defrule
  733.     (goal monk-rating FAIR)
  734.     (difficulty <= moderate)
  735.     (game-time >= 700)
  736.     (player-computer any-ally)
  737. =>
  738.     (set-goal monk-rating GOOD)
  739.     (chat-to-player-using-id every-ally 22409)    ;230
  740.     (disable-self)
  741. )
  742.  
  743. (defrule
  744.     (goal siege-available YES)
  745.     (soldier-count >= five-percent-pop)
  746.     (unit-type-count-total monk < 1)
  747.     (can-train monk)
  748.     (not (goal monk-rating NO) )
  749. =>
  750.     (train monk)
  751. )
  752.  
  753. ;make a few monks 
  754. (defrule
  755.     (goal siege-available YES)
  756.     (soldier-count > ten-percent-pop)
  757.     (difficulty <= moderate)
  758.     (unit-type-count-total monk < five-percent-pop)
  759.     (or
  760.         (goal monk-rating GOOD)
  761.         (and
  762.             (goal monk-rating FAIR)
  763.             (gold-amount >= 300)
  764.         )
  765.     )
  766.     (can-train monk)
  767. =>
  768.     (train monk)
  769. )
  770.  
  771. ;make more monks
  772. (defrule
  773.     (goal siege-available YES)
  774.     (soldier-count > ten-percent-pop)
  775.     (current-age == imperial-age)
  776.     (difficulty <= moderate)
  777.     (unit-type-count-total monk < ten-percent-pop)
  778.     (or
  779.         (goal monk-rating GOOD)
  780.         (and
  781.             (goal monk-rating FAIR)
  782.             (gold-amount >= 300)
  783.         )
  784.     )
  785.     (can-train monk)
  786. =>
  787.     (train monk)
  788. )
  789.  
  790. ;if we have lots of gold, build monks sans restraint
  791. (defrule
  792.     (goal siege-available YES)
  793.     (goal monk-rating GOOD)
  794.     (difficulty <= moderate)
  795.     (soldier-count > ten-percent-pop)
  796.     (gold-amount >= 300)
  797.     (unit-type-count-total monk < fifteen-percent-pop)
  798.     (can-train monk)
  799. =>
  800.     (train monk)
  801. )
  802. ;************************************************
  803.